<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>Gas Managements System - <%=(String)session.getAttribute("lt") %></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
   <script type="text/javascript" src="script/general.js"> </script>
 <script type="text/javascript" src="script/gen_validatorv31.js"> </script>
 <script type="text/javascript" src="script/form_validation.js"> </script>
  
  <script type="text/javascript" src="script/mm_menu.js"> </script>
  </head>
  <%

 if(session.getAttribute("user")==null)
     response.sendRedirect("LoginForm.jsp?status=Session Expired");
 %>
  <body>
      <jsp:include page="Header.jsp"></jsp:include>
  
  
   <%
     if(request.getParameter("status")!=null){
    %>
    <font color="red"><%=request.getParameter("status") %></font>
    <%} %>
   <form name="loginform" action="./UserCompalintsAction">
   <table align="center" bgcolor="#ffddd">
   <tr><td align="center" colspan="2" bgcolor="nabi"><font color="white"><b>Complaints Form</b></font></td></tr>
   <%
      int userid=(Integer)session.getAttribute("userid");
     %>
  <input type="hidden" name="userid" value="<%=userid %>">
   <tr>
   <td align='right'><b>ComplaintDesc :</b></td>
   <td><textarea name="ComplaintDesc" height="" width="">
</textarea></td>
  
   <tr>
   <td><input type="submit" value="Post Complaint"></td>
   <td><input type="reset" value="Cancel"></td>
   </tr>
   
   </table>
   </form>
   <script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("loginform");
  
 
  frmvalidator.addValidation("desc","req","Please enter Complaint desc");
  
  frmvalidator.addValidation("complaintdate","req","Please enter Complaint Date");
 
 
     
 </script>
<br><br><br><br><br><br><br><br>
          <jsp:include page="Footer.jsp"></jsp:include>
  </body>
</html>
